// 标题栏状态
const state = {
    header: {
        opened: true,
        canBack: false,
        canClose: false,
        title: '1561'
    }
}
// 修改状态
const mutations = {
    TOGGLE_HEADER: (state, mate) => {
        state.header.opened = !!mate.title
        state.header.title = mate.title
        state.header.canBack = mate.canBack !== false
    },
    SETTING_HEADER_ACTIVE:(state, data) => {
        console.log(state, data)
    }
}

const actions = {
    toggleHeader({ commit }, mate) {
        commit('TOGGLE_HEADER', mate)
    }
}

export default {
    namespaced: false,
    state,
    mutations,
    actions
}
